package com.example.web.config;

import java.util.Date;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * 接受
 * @author xxx
 * @Description
 * @project springboot_learn
 * @package com.dalaoyang.receiver
 * @email yangyang@dalaoyang.cn
 * @date 2018/4/25
 */
@Slf4j
@Component
@RabbitListener(queues = "message")
public class Receiver {

    @RabbitHandler
    public void process(String Str) {
        log.info("接收消息："+Str);
        log.info("接收消息时间："+new Date());
    }
}
